<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>'用户设置'))}
	<div class="sub-frame gray">
		<form method='post' id="form_data" >
			<input type="hidden" name="ajax" id="ajax" value="0">
			<div class="layui-form-item">
				<label class="layui-form-label" for="list_rows">列表数量：</label>
				<div class="layui-input-block">
					<input class="layui-input col-20" type="text" id="list_rows" name="list_rows" value="{$config.list_rows}" check="number" info="必须是数字">
				</div>
			</div>
			<div class="layui-form-item hidden">
				<label class="layui-form-label" for="list_rows">网页推送：</label>
				<div class="layui-input-block">
					<label class="col-6">
						<input name="push_web[]" class="ace push_web" type="checkbox" value="mail">
						<span class="lbl">邮件</span> </label>
					<label class="col-6">
						<input name="push_web[]" class="ace push_web" type="checkbox" value="flow">
						<span class="lbl">流程</span> </label>
					<label class="col-6">
						<input name="push_web[]" class="ace push_web" type="checkbox" value="info">
						<span class="lbl">信息</span> </label>
					<label class="col-6">
						<input name="push_web[]" class="ace push_web" type="checkbox" value="task">
						<span class="lbl">任务</span> </label>
					<label class="col-6">
						<input name="push_web[]" class="ace push_web" type="checkbox" value="message">
						<span class="lbl">消息</span> </label>
				</div>
			</div>
			<div class="layui-form-item hidden">
				<label class="layui-form-label" for="list_rows">微信推送：</label>
				<div class="layui-input-block">
					<label class="col-6">
						<input name="push_wechat[]" class="ace push_wechat" type="checkbox" value="mail">
						<span class="lbl">邮件</span> </label>
					<label class="col-6">
						<input name="push_wechat[]" class="ace push_wechat" type="checkbox" value="flow">
						<span class="lbl">流程</span> </label>
					<label class="col-6">
						<input name="push_wechat[]" class="ace push_wechat" type="checkbox" value="info">
						<span class="lbl">信息</span> </label>
					<label class="col-6">
						<input name="push_wechat[]" class="ace push_wechat" type="checkbox" value="task">
						<span class="lbl">任务</span> </label>
					<label class="col-6">
						<input name="push_wechat[]" class="ace push_wechat" type="checkbox" value="message">
						<span class="lbl">消息</span> </label>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<a id="btn_save"  class="btn">保存</a>
				</div>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global'], function() {
			var $ = layui.jquery;
			

			set_return_url(null);
			//保存后关闭
			$('#btn_save').on('click', function() {
				send_form('form_data', '{:U("save")}', '', function(ret) {
					if (ret.status == 1) {
						layer.msg(ret.info);
						layer.close(index);
						location.reload(true);
					} else {
						layer.msg(ret.info);
						return false;
					}
				});
			});
		});

	</script>
</block>